document.querySelector(".content .content-bd .col-main .mo-order .mo-clearfix .mo-tab-hd").onclick = (function(event){
    var element = event.target
    var colli = document.querySelectorAll(".content .content-bd .col-main .mo-order .mo-clearfix .mo-tab-hd li")
    for(var i = 0;i < colli.length;i++){
        colli[i].className = ""
        console.log(colli[i].className)
    }
    element.className = "mo-afli"
})



// ---------------------------------------订单预览3个状态切换隐藏浏览框---------------------------------------
//
document.querySelector(".content .content-bd .col-main .mo-order .mo-clearfix .mo-tab-hd #l1").onclick = function(){
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text-in").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd1").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd2").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd3").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd4").style.display="none"

}
// 查询我的待支付的订单
function getMyWait4PayOrders(orderStatus){
    var token = localStorage.getItem("token");
    console.log("当前查询的订单状态是：" + orderStatus)
    location.href="../../orders/getOrdersByCustomerIdAndStatus/"+token+"/"+orderStatus;
}

//待支付  status = 1 , custId = ?
document.querySelector(".content .content-bd .col-main .mo-order .mo-clearfix .mo-tab-hd #l2").onclick = function(){
    console.log("000000000000000000")
    getMyWait4PayOrders(0);
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text-in").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd1").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd2").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd3").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd4").style.display="none"
}

document.querySelector(".content .content-bd .col-main .mo-order .mo-clearfix .mo-tab-hd #l3").onclick = function(){
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text-in").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd1").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd2").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd3").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd4").style.display="none"
}

document.querySelector(".content .content-bd .col-main .mo-order .mo-clearfix .mo-tab-hd #l4").onclick = function(){
    console.log("11111111111111111111111111111")
    getMyWait4PayOrders(1);
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text-in").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd1").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd2").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd3").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd4").style.display="none"
}
document.querySelector(".content .content-bd .col-main .mo-order .mo-clearfix .mo-tab-hd #l5").onclick = function(){
    console.log("2222222222222222222")
    getMyWait4PayOrders(2);
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd-text-in").style.display="block"
    document.querySelector(".content .content-bd .col-main .mo-order .bd").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd1").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd2").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd3").style.display="none"
    document.querySelector(".content .content-bd .col-main .mo-order .bd4").style.display="none"
}